home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / pc_ipc.zip / PC-IPC.H < prev    next >
Text File  |  1989-11-17  |  3KB  |  95 lines

  1. /************************************************************************/
  2. /*                                      */
  3. /*    File PC-IPC.H                              */
  4. /*                                    */
  5. /*    Copyright (c) 1989 Donnelly Software Engineering        */
  6. /*                                    */
  7. /*  This file contains the definitions for the default IPC interrupt    */
  8. /*  vector, return status masks, IPC commands, IPC error codes, the    */
  9. /*  type definition of IPC_PARAM_BLOCK, and the function prototypes    */
  10. /*  for the modules in IPCLIB.LIB.                    */
  11. /*                                      */
  12. /************************************************************************/
  13.  
  14. #ifndef    PC_IPC_DEF
  15. #define    PC_IPC_DEF    1
  16.  
  17. #define        IPC_TRUE    1
  18. #define        IPC_FALSE    0
  19. #define        IPC_VECTOR    0x60
  20.  
  21. /* ipc status flags */
  22. #define        IPC_STAT_ENABLED    2
  23. #define        IPC_STAT_INSTALLED    4
  24. #define        IPC_STAT_ERROR        8
  25. #define        IPC_STAT_AVDATA        16
  26.  
  27. /* ipc commands */
  28. #define        IPC_CMND_INQUIRE    1
  29. #define        IPC_CMND_ENABLE        2
  30. #define        IPC_CMND_DISABLE    3
  31. #define        IPC_CMND_INSTALL    4
  32. #define        IPC_CMND_RDATA        6
  33. #define        IPC_CMND_SDATA        7
  34. #define        IPC_CMND_REQID        8
  35. #define        IPC_CMND_DELID        9
  36. #define        IPC_CMND_RDATAW        10
  37. #define        IPC_CMND_VERS        11
  38.  
  39. /* ipc error codes */
  40. #define        IPC_ERR_NOERR        0
  41. #define        IPC_ERR_BADCMND        1
  42. #define        IPC_ERR_INST0        2
  43. #define        IPC_ERR_CANTENAB    3
  44. #define        IPC_ERR_NOTENAB        4
  45. #define        IPC_ERR_CANTDISAB    5
  46. #define        IPC_ERR_BADTOID        6
  47. #define        IPC_ERR_BADFMID        7
  48. #define        IPC_ERR_NOADDR        8
  49. #define        IPC_ERR_MAXIDS        9
  50. #define        IPC_ERR_CANTRELI    10
  51. #define        IPC_ERR_NOMEM        11
  52. #define        IPC_ERR_NOTINST        12
  53.  
  54. /* parameter block used to interface with IPC */
  55. typedef    struct    ipc_param_block
  56.     {
  57.     unsigned    int    my_id;
  58.     unsigned    int    to_id;
  59.     unsigned    int    command;
  60.     unsigned    int    status;
  61.     unsigned    int    error;
  62.     unsigned    int    size;
  63.     void        far    *data_ptr;
  64.     } IPC_PARAM_BLOCK;
  65.  
  66. /* procedure declarations */
  67.  
  68. void far pc_ipc(unsigned int vector,
  69.             IPC_PARAM_BLOCK far *param_ptr);
  70.  
  71. void far ipc_error(unsigned int index);
  72.  
  73. void far init_param_block(IPC_PARAM_BLOCK far *param,
  74.             unsigned int my_id,
  75.             unsigned int to_id,
  76.             unsigned int command,
  77.             unsigned int size,
  78.             void far *data_ptr);
  79.  
  80. int far pc_ipc_installed(unsigned int vector);
  81.  
  82. void far get_ipc_version(unsigned int vector,
  83.             char far *version);
  84.  
  85.     /* ipc_getvect() and ipc_print() enable functions within    */
  86.     /* IPCLIB.LIB to be independant of any run-time library        */
  87.     /* routines. The are not intended for general use.        */
  88.  
  89. void far ipc_getvect(unsigned int vector,
  90.             unsigned long far *int_ptr);
  91.  
  92. void far ipc_print(char far *data);
  93.  
  94. #endif
  95.